home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
DataTypeTags.st
< prev
next >
Wrap
Text File
|
2002-03-15
|
21KB
|
604 lines
" ------------------------------------------------------------------- "
" DataTypesClassTags Class is a Singleton class that allows the user "
" to reference DataType class tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTClassTag: #DTST_FILE' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DataTypesClassTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateInitializeDictionary "Too big to be in a Block:"
self at: #DTST_RAM put: 1.
self at: #DTST_FILE put: 2.
self at: #DTST_CLIPBOARD put: 3.
self at: #DTST_HOTLINK put: 4.
self at: #DTST_MEMORY put: 5.
self at: #DTA_Dummy put: 16r80001000.
"Generic attributes"
"Pointer to the default TextAttr to use for
* the text within the object.
"
self at: #DTA_TextAttr put: 16r8000100A.
"Current top vertical unit:"
self at: #DTA_TopVert put: 16r8000100B.
"Number of visible vertical units:"
self at: #DTA_VisibleVert put: 16r8000100C.
"Total number of vertical units:"
self at: #DTA_TotalVert put: 16r8000100D.
"Number of pixels per vertical unit:"
self at: #DTA_VertUnit put: 16r8000100E.
"Current top horizontal unit:"
self at: #DTA_TopHoriz put: 16r8000100F.
"Number of visible horizontal units:"
self at: #DTA_VisibleHoriz put: 16r80001010.
"Total number of horizontal units:"
self at: #DTA_TotalHoriz put: 16r80001011.
"Number of pixels per horizontal unit:"
self at: #DTA_HorizUnit put: 16r80001012.
"Name of the current element within the object:"
self at: #DTA_NodeName put: 16r80001013.
"Title of the object:"
self at: #DTA_Title put: 16r80001014.
"Pointer to a NULL term'd array of trigger methods:"
self at: #DTA_TriggerMethods put: 16r80001015.
"Object specific data:"
self at: #DTA_Data put: 16r80001016.
"Default font to use for text within the object:"
self at: #DTA_TextFont put: 16r80001017.
"Pointer to a ~0 terminated array of supported methods:"
self at: #DTA_Methods put: 16r80001018.
"Printer error message:"
self at: #DTA_PrinterStatus put: 16r80001019.
"Pointer to the print process:"
self at: #DTA_PrinterProc put: 16r8000101A.
"Pointer to the layout process:"
self at: #DTA_LayoutProc put: 16r8000101B.
"Used to turn the applications' busy pointer off/on:"
self at: #DTA_Busy put: 16r8000101C.
"Used to indicate that new information has been loaded into
* an object. This is for models that cache the
* DTA_TopVert-like tags:
"
self at: #DTA_Sync put: 16r8000101D.
"The base name of the class:"
self at: #DTA_BaseName put: 16r80001E.
"Group that the object must belong in:"
self at: #DTA_GroupID put: 16r8000101F.
"Error level:"
self at: #DTA_ErrorLevel put: 16r80001020.
"datatypes.library error number:"
self at: #DTA_ErrorNumber put: 16r80001021.
"Argument for datatypes.library error:"
self at: #DTA_ErrorString put: 16r80001022.
"New for V40. Specifies the name of the
* realtime.library conductor. Defaults to 'Main'.
"
self at: #DTA_Conductor put: 16r80001023.
"New for V40. Indicate whether a control panel should be
* embedded within the object (in the animation datatype,
* for example). Defaults to TRUE.
"
self at: #DTA_ControlPanel put: 16r80001024.
"New for V40. (BOOL) Indicate whether the object should
* immediately begin playing. Defaults to FALSE.
"
self at: #DTA_Immediate put: 16r80001025.
"New for V40. (BOOL) Indicate that the object should repeat
* playing. Defaults to FALSE.
"
self at: #DTA_Repeat put: 16r80001026.
"New for V44. Address of a DTST_MEMORY source type object:"
self at: #DTA_SourceAddress put: 16r80001027.
"New for V44. Size of a DTST_MEMORY source type object:"
self at: #DTA_SourceSize put: 16r80001028.
"Reserved tag; DO NOT USE (V44):"
self at: #DTA_Reserved put: 16r80001029.
"DTObject attributes:"
self at: #DTA_Name put: 16r80001064.
self at: #DTA_SourceType put: 16r80001065.
self at: #DTA_Handle put: 16r80001066.
self at: #DTA_DataType put: 16r80001067.
self at: #DTA_Domain put: 16r80001068.
"DON'T USE THE FOLLOWING FOUR TAGS. Use the corresponding tags in
* Intuition/GadgetAttrs.st:
"
self at: #DTA_Left put: 16r80001069.
self at: #DTA_Top put: 16r8000106A.
self at: #DTA_Width put: 16r8000106B.
self at: #DTA_Height put: 16r8000106C.
self at: #DTA_ObjName put: 16r8000106D.
self at: #DTA_ObjAuthor put: 16r8000106E.
self at: #DTA_ObjAnnotation put: 16r8000106F.
self at: #DTA_ObjCopyright put: 16r80001070.
self at: #DTA_ObjVersion put: 16r80001071.
self at: #DTA_ObjectID put: 16r80001072.
self at: #DTA_UserData put: 16r80001073.
self at: #DTA_FrameInfo put: 16r80001074.
"DON'T USE THE FOLLOWING FOUR TAGS. Use the corresponding tags in
* Intuition/GadgetAttrs.st:
"
self at: #DTA_RelRight put: 16r80001075.
self at: #DTA_RelBottom put: 16r80001076.
self at: #DTA_RelWidth put: 16r80001077.
self at: #DTA_RelHeight put: 16r80001078.
self at: #DTA_SelectDomain put: 16r80001079.
self at: #DTA_TotalPVert put: 16r8000107A.
self at: #DTA_TotalPHoriz put: 16r8000107B.
self at: #DTA_NominalVert put: 16r8000107C.
self at: #DTA_NominalHoriz put: 16r8000107D.
"Printing attributes:"
"Destination X width:"
self at: #DTA_DestCols put: 16r80001190.
"Destination Y height:"
self at: #DTA_DestRows put: 16r80001191.
"Option flags:"
self at: #DTA_Special put: 16r80001192.
"RastPort to use when printing. (V40):"
self at: #DTA_RastPort put: 16r80001193.
"Pointer to base name for ARexx port (V40):"
self at: #DTA_ARexxPortName put: 16r80001194.
self at: #DTST_RAM put: 1.
self at: #DTST_FILE put: 2.
self at: #DTST_CLIPBOARD put: 3.
self at: #DTST_HOTLINK put: 4.
self at: #DTST_MEMORY put: 5. "New for V44"
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DTSpecialInfoTags Class is a Singleton class that allows the user "
" to reference DataType SpecialInfo tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTSpecialInfoTag: #DTSIF_NEWSIZE' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DTSpecialInfoTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
"Object is in layout processing:"
self at: #DTSIF_LAYOUT put: 1.
"Object needs to be lain-out:"
self at: #DTSIF_NEWSIZE put: 2.
self at: #DTSIF_DRAGGING put: 4.
self at: #DTSIF_DRAGSELECT put: 8.
self at: #DTSIF_HIGHLIGHT put: 16r10.
"Object is being printed:"
self at: #DTSIF_PRINTING put: 16r20.
"Object is in layout process:"
self at: #DTSIF_LAYOUTPROC put: 16r40
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DTMethodTags Class is a Singleton class that allows the user "
" to reference DataType Method tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTMethodTag: #DTM_FRAMEBOX' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DTMethodTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #DTM_Dummy put: 16r600.
"Inquire what environment an object requires:"
self at: #DTM_FRAMEBOX put: 16r601.
"Same as GM_LAYOUT except guaranteed to be on a process:"
self at: #DTM_PROCLAYOUT put: 16r602.
"Layout that is occurring on a process:"
self at: #DTM_ASYNCLAYOUT put: 16r603.
"When a RemoveDTObject() is called:"
self at: #DTM_REMOVEDTOBJECT put: 16r604.
self at: #DTM_SELECT put: 16r605.
self at: #DTM_CLEARSELECTED put: 16r606.
self at: #DTM_COPY put: 16r607.
self at: #DTM_PRINT put: 16r608.
self at: #DTM_ABORTPRINT put: 16r609.
self at: #DTM_NEWMEMBER put: 16r610.
self at: #DTM_DISPOSEMEMBER put: 16r611.
self at: #DTM_GOTO put: 16r630.
self at: #DTM_TRIGGER put: 16r631.
self at: #DTM_OBTAINDRAWINFO put: 16r640.
self at: #DTM_DRAW put: 16r641.
self at: #DTM_RELEASEDRAWINFO put: 16r642.
self at: #DTM_WRITE put: 16r650
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DTFrameInfoTags Class is a Singleton class that allows the user "
" to reference DataType FrameInfo tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTFrameInfoTag: #FIF_SCALABLE' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DTFrameInfoTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #FIF_SCALABLE put: 1.
self at: #FIF_SCROLLABLE put: 2.
self at: #FIF_REMAPPABLE put: 4
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" BasicDataTypeTags Class is a Singleton class that allows the user "
" to reference Basic DataType tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getBasicDTTag: #DTF_BINARY' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class BasicDataTypeTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #DTF_TYPE_MASK put: 16r000F.
self at: #DTF_BINARY put: 0.
self at: #DTF_ASCII put: 1.
self at: #DTF_IFF put: 2.
self at: #DTF_MISC put: 3.
"Set if case is important:"
self at: #DTF_CASE put: 16r10.
"Reserved for system use:"
self at: #DTF_SYSTEM1 put: 16r1000
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DataTypeToolTags Class is a Singleton class that allows the user "
" to reference DataType Tool tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTToolTag: #TW_PRINT' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DataTypeToolTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
"defines for tn_Which:"
self at: #TW_INFO put: 1.
self at: #TW_BROWSE put: 2.
self at: #TW_EDIT put: 3.
self at: #TW_PRINT put: 4.
self at: #TW_MAIL put: 5.
"defines for tn_Flags:"
self at: #TF_LAUNCH_MASK put: 16r000F.
self at: #TF_SHELL put: 16r0001.
self at: #TF_WORKBENCH put: 16r0002.
self at: #TF_RX put: 16r0003
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DataTypeErrorTags Class is a Singleton class that allows the user "
" to reference DataType Error tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTErrorTag: #DTERROR_COULDNT_SAVE' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DataTypeErrorTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
"Text ID's:"
self at: #DTERROR_UNKNOWN_DATATYPE put: 2000.
self at: #DTERROR_COULDNT_SAVE put: 2001.
self at: #DTERROR_COULDNT_OPEN put: 2002.
self at: #DTERROR_COULDNT_SEND_MESSAGE put: 2003.
"New for V40:"
self at: #DTERROR_COULDNT_OPEN_CLIPBOARD put: 2004.
self at: #DTERROR_Reserved put: 2005.
self at: #DTERROR_UNKNOWN_COMPRESSION put: 2006.
self at: #DTERROR_NOT_ENOUGH_DATA put: 2007.
self at: #DTERROR_INVALID_DATA put: 2008.
"New for V44:"
self at: #DTERROR_NOT_AVAILABLE put: 2009.
"Offset for types:"
self at: #DTMSG_TYPE_OFFSET put: 2100
].
^ self "or ^ uniqueInstance??"
]
" ------------------------------------------------------------------- "
" DTSystemTags Class is a Singleton class that allows the user "
" to reference DataType System tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since DataTypeSystem "
" Class will instantiate the only needed instance of this Class. See "
" the DataTypeSystem.st source file for the method(s) that help the "
" User with this Class. "
""
" EXAMPLE: 'myTag <- dataTypeSystem getDTSystemTag: #STM_PLAY' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" ------------------------------------------------------------------- "
Class DTSystemTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #STM_PAUSE put: 1.
self at: #STM_PLAY put: 2.
self at: #STM_CONTENTS put: 3.
self at: #STM_INDEX put: 4.
self at: #STM_RETRACE put: 5.
self at: #STM_BROWSE_PREV put: 6.
self at: #STM_BROWSE_NEXT put: 7.
self at: #STM_NEXT_FIELD put: 8.
self at: #STM_PREV_FIELD put: 9.
self at: #STM_ACTIVATE_FIELD put: 10.
self at: #STM_COMMAND put: 11.
"New for V40:"
self at: #STM_REWIND put: 12.
self at: #STM_FASTFORWARD put: 13.
self at: #STM_STOP put: 14.
self at: #STM_RESUME put: 15.
self at: #STM_LOCATE put: 16
].
^ self "or ^ uniqueInstance??"
]